﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace Axe.ComponentModel
{
    public class PercentTypeConverter : TypeConverter
    {
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
        {
            double v = (double)value;
            return String.Format("{0:F2}%", v * 100);
        }
    }
}
